package com.kaifamiao.N0729;

public class Pett {
    public void cry(){
        System.out.println("宠物叫声");
    }
}

class Dog1 extends Pett{
    public void cry(){
        System.out.println("狗的叫声：汪 汪 汪");
    }
}

class Cat extends Pett {
     public void cry() {
         System.out.println("猫的叫声：喵 喵 喵");
     }
}

 class Duck extends Pett{
        public void cry(){
            System.out.println("鸭子叫声：嘎 嘎 嘎");
        }
}

class Host{
        public void letCry(Pett pett){
            pett.cry();
        }
}




